package com.ea.eadp.nexus.portal.tests;

import com.ea.eadp.nexus.test.common.ApiClients.NexusConnectApi;
import com.ea.eadp.nexus.test.common.ApiClients.NucleusApi;
import com.ea.eadp.nexus.test.common.TestUtil;
import org.testng.annotations.Test;

/**
 * Created with IntelliJ IDEA.
 * User: jianzhou
 * Date: 21/10/13
 * Time: 11:20
 * To change this template use File | Settings | File Templates.
 */
public class testRememberMeCookie {
    private static final String defaultPassword = "1234qwER";

    //this is a temp case for remid load test not a regression case
    @Test
    public void getRememberMeCookie() throws Exception {
        String email = TestUtil.getRandomEmail();
        long pid = TestUtil.getPidID(NucleusApi.instance().postPidAndPersonaIfNotExisted(email, defaultPassword));
        for (int i = 0; i < 10000; i++) {
            String remid = NexusConnectApi.instance().loginAndCheckRemid(email, defaultPassword);
            remid = NexusConnectApi.instance().loginWithRemid(remid);
        }
    }

}
